using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Issuedetail : IAccessible<T_Issuedetail, Issuedetail>, ILogicEntity<T_Issuedetail, Issuedetail>
    {
        public int ID { get; set; }

        public int IssueID { get; set; }

        public int GoodsID { get; set; }

        public int IssueAmount { get; set; }

        public decimal IssuePrice { get; set; }

        public decimal IssueMoney { get; set; }

        protected override void Covariant(T_Issuedetail model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.IssueID = model.IssueID;
                    this.GoodsID = model.GoodsID;
                    this.IssueAmount = model.IssueAmount;
                    this.IssuePrice = model.IssuePrice;
                    this.IssueMoney = model.IssueMoney;
            }
}
        protected override T_Issuedetail Inverter(Issuedetail model)
        {
            if (model != null)
            {
                return new T_Issuedetail()
                {
                    ID = model.ID,
                    IssueID = model.IssueID,
                    GoodsID = model.GoodsID,
                    IssueAmount = model.IssueAmount,
                    IssuePrice = model.IssuePrice,
                    IssueMoney = model.IssueMoney,
                };
            }
            return null;
        }
        public Issuedetail Set(T_Issuedetail dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
